home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
001a
/
tlxjwpc5.zip
/
RBBSN4.SLT
< prev
next >
Wrap
Text File
|
1990-12-31
|
8KB
|
253 lines
//╔═════════════════════════════════════════════════════════════════════╗
//║ RBBS 17.3B JW-PC Consulting DataFlex.HST (608)837-1923 ║
//║ Dual Std HST/V.32/MNP5/V.42 RBBSnet 8:972/2 FIDOnet 1:121/8 ║
//╚═════════════════════════════════════════════════════════════════════╝
// RBBSN4.SLT by Jim Wargula, Sysop of JW-PC DataFlex.HST, 12-21-90.
// This is a sample TELIX script for logging on to JW-PC DataFlex.HST.
// It will log in, download SMLNET sequence list new messages, and start
// to read main base messages. The name of the bbs will show on the
// status line.
str user_name[30] = "joe schmoe ";
// Put your name in the above line. The script will get the proper password
// from the dialing directory (Telix puts that password in the script system
// variable called _entry_pass). Use spaces as in example!
// Before using this script for the first time, or when you make a change,
// type 'cs rbbsn3' at the DOS prompt to compile the script for use by Telix.
//////////////////////////////////////////////////////////////////////////////
// globals
//
// used by showname():
//
int statline = 24; // Telix status line row
int statback = 7; // status line background color
int statfore = 0; // status line foreground color
str failed[] = "Logon failed.";
// DSZ stuff
str dsz[84] =
"c:\util\DSZ port ";
str upld[32] =
" pW1 pB4096 ha cts sz -b -m -r ";
str dnld[32]=
" pW1 pB4096 ha cts rz -b -m -rr ";
str port[1];
//////////////////////////////////////////////////////////////////////////////
// main routine
//
main()
{
int stat;
int t1, t2, t3, t4, t5, t6, t7, t8, t9;
int tmark;
alarm(1); // connect!
itos(get_port(),port);
showname();
if (not _entry_pass) // no pass, so didn't recog. board
{
prints ("Sorry, I don't know the password for this BBS!");
return;
}
strcat (user_name, _entry_pass); // build name for turbo login
strcat (user_name, " !");
t1 = track ("ontinue", 1); // define tracks
t2 = track ("First name?", 1);
t3 = track (" ([Y],N", 1);
t4 = track (">? ", 1);
t5 = track (", Enter ", 1);
t6 = track (" : ", 1);
t7 = track ("Countdown =", 1);
t8 = track ("**", 1);
t9 = track ("More [Y", 1);
delay_scr (80); // wait 8 seconds for front end
cputs ("^["); // send escape to wake bbs up!
tmark = timer_start (6000); // wait up to 10 minutes for login Part I
//////////////////////////////////////////////////////////////////////////////
// Loop I - Login, open NET door, extract messages.
//
while (not time_up (tmark))
{
terminal(); // let Telix process any chars and keys
stat = track_hit (0); // see which (if any) track was hit
if (stat == t1) // respond to Key to continue
{
delay (1);
cputs ("^M");
}
else if (stat == t2) // send name and password
{
cputs (user_name);
cputs ("^M");
}
else if (stat == t3) // send "NO"
{
cputs ("n^M");
}
else if (stat == t9) // send "NO"
{
delay (1);
cputs ("n^M");
}
////////////////////////// comment out or delete section of code
////////////////////////// between these and comment bars below
////////////////////////// for standard login - no netmail called
else if (stat == t4) // main menu...
{
delay (1);
cputs ("d xpress^M"); //open Net Door
}
else if (stat == t5) //net conference menu...
{
delay (1);
cputs ("d^M"); //scan/download messages
break; //goto next section tracking
}
}
if (time_up (tmark))
{
prints ("Part I failed!");
return;
}
timer_free (tmark); // free timer channel
tmark = timer_start (12000); // wait up to 20 minutes for login Part II
//////////////////////////////////////////////////////////////////////////////
// Loop II - Download extract file
//
strcat(dsz,port);
strcat(dsz,dnld);
strcat(dsz,_down_dir); //using ZmodemMobyturbo
while (not time_up (tmark))
{
terminal(); // let Telix process any chars and keys
stat = track_hit (0); // see which (if any) track was hit
if (stat == t6) //pack extract
{
delay (1);
cputs ("a^M");
}
else if (stat == t7) // respond to continue
{
cputs ("^M");
}
else if (stat == t8) // call zmodem
{
dos(dsz,0);
break; //goto next section tracking
}
}
if (time_up (tmark))
{
prints ("Part II failed!");
return;
}
timer_free (tmark); // free timer channel
tmark = timer_start (1800); // wait up to 3 minutes for login Part III
//////////////////////////////////////////////////////////////////////////////
// Loop III - Exit Xpress door, read messages
//
while (not time_up (tmark))
{
terminal(); // let Telix process any chars and keys
stat = track_hit (0); // see which (if any) track was hit
if (stat == t5) // good-bye to Xpress door
{
delay (1);
cputs ("q^M");
}
////////////////////////// comment out or delete section of code
////////////////////////// between these and comment bars above
////////////////////////// for standard login - no netmail called
else if (stat == t4) // main menu back
{
cputs ("r s^M");
break; // read msgs & done
}
}
//////////////////////////////////////////////////////////////////////////////
// End - Clean-up
//
if (time_up (tmark))
{
prints ("Part III failed!");
return;
}
timer_free (tmark); // free timer channel
track_free (0); // and all track channels
alarm (5); // sound alarm, we're there!
}
//////////////////////////////////////////////////////////////////////////////
// Function: showname
// Description: Displays the name of the system you're connected to, or
// "Alt-Z for Help" if you're not connected to anything.
//
// You can plug this into ANY logon script file, just call it
// as shown in main().
//
// This routine will overwrite the "Alt-Z for Help" message,
// but I think it's worth it. If you don't like this feature,
// set the Anonymous option in SLCONFIG to 'y' (YES).
// Parameters: none
// Returns: nothing
//
showname()
{
str name[14]; // name to display
int x, y; // old cursor position
x = getx(); // save current position
y = gety(); //
substr(_entry_name, 0, 14, name); // get the current BBS name
if ((strlen(name) == 0) || (! carrier())) // no name or not connected?
name = "Alt-Z for Help"; // then display help message
strcat(name, " "); // pad name with spaces
pstraxy( name, 1, statline, // display it
(statback * 16) + statfore
);
gotoxy(x, y); // return to saved position
}